fix(cli): drop stale ownership key from init scaffold object template#1869
Merged
Conversation
The `os init` scaffold emitted `ownership: 'own'` on the starter object in both the `app` and `plugin` templates. `ownership` is no longer a valid ObjectSchema field — it's removed from ObjectSchemaBase, and `ObjectSchema.create()` now rejects unknown top-level keys (ADR-0032 / #1535). A user copying the scaffolded object into `ObjectSchema.create({...})` would hit a validation error; the plain-literal form merely hid the problem while teaching a dead field. Remove the key from both templates. Rest of the scaffold output is unchanged; init.test.ts (28 tests) passes and end-to-end render of both templates confirms no `ownership` remains. Surfaced during the docs audit in #1866 (getting-started/quick-start.mdx). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
os initscaffold emittedownership: 'own'on the starter object in both theappandplugintemplates (packages/cli/src/commands/init.ts). This PR removes it.Why
ownershipis no longer a validObjectSchemafield — it's not inObjectSchemaBase, andObjectSchema.create()rejects unknown top-level keys (ADR-0032 / #1535). The'own'/'extend'values belong toObjectOwnershipEnum, which models a package↔object relationship (objectExtensions/manifests), not a top-level object-schema field.The scaffold emitted the starter object as a plain object literal, so it didn't throw at scaffold time — but it taught a dead field, and a user migrating the object into
ObjectSchema.create({...})would hit a validation error.Surfaced during the docs audit in #1866 (
getting-started/quick-start.mdx), where the example was aligned to the scaffold output while the scaffold itself still carried the stale key.Verification
pnpm vitest run test/init.test.ts→ 28/28 pass.appandpluginobject templates → neither containsownership; rest of scaffold output unchanged.🤖 Generated with Claude Code